home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
pasprog.EXE
/
BFS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1980-01-10
|
2KB
|
71 lines
Uses Crt;
Const
FExt='.Bin';
Var
F:File;
R:Integer;
D:String;
AKey,FPos:Word;
function Segment:word;
begin
if (mem[0:$0410] and $30)=$30 then segment:=$b000
else segment:=$b800;
end;
Function Key:Word;
Var
Ch:Char;
Begin
Ch:=ReadKey;
If (Ch=#0) And KeyPressed Then
Begin
Ch:=ReadKey;
Key:=Ord(Ch) Shl 8;
End Else Key:=Ord(Ch);
End;
Begin
If ParamCount=0 Then
Begin
Write('Dosya Adì : ');
Readln(D);
If D='' Then
Begin
Writeln('Dosya ÿsmi Geçersiz.');
Halt;
End;
End Else D:=ParamStr(1);
If Pos('.',D)=0 Then D:=D+FExt;
Assign(F,D);
{$I-} Reset(F,4000); {$I+}
If IOResult<>0 then
Begin
Writeln(D,' ÿsimli Dosya Bulunamadì.');
Halt;
End;
While Not Eof(F) Do
Begin
BlockRead(F,Ptr(Segment,0)^,1,R);
If R<1 Then Break;
Repeat
AKey:=Key;
Case AKey Of
27 :Begin
Close(F);
ClrScr;
Writeln('TurboSoft Binary File Show by Murat AKSARAY');
Halt;
End;
18432:If FilePos(F)>1 Then
Begin
FPos:=FilePos(F)-2;
Seek(F,FPos);
Break;
End;
20480:Break;
End;
Until 1=2;
End;
Close(F);
ClrScr;
Writeln('TurboSoft Binary File Show 1995 by Murat AKSARAY');
End.